﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <script src="~/vue/vue.js"></script>
    <link href="~/element-ui/theme-chalk/index.css" rel="stylesheet" />
    <script src="~/element-ui/index.js"></script>
    <script src="~/vue/vue-resource.js"></script>
    <script src="~/lib/jquery/dist/jquery.js"></script>
    <title>Index</title>              
    <script src="~/vue/vue-resource.js"></script>
    <title>Index</title>
    <script src="~/lib/jquery/dist/jquery.js"></script> 
    <title>Index</title>
</head>
<body>
    <div id="user">
        <el-container style="height: 920px; border: 1px solid #eee" >
            <el-header style="text-align: right; font-size: 12px;background-color:#545c64">
                <el-menu mode="horizontal" background-color="#545c64">
                    <el-menu-item>
                        <img src="~/Img/silvon-inc-20-240.png" style="width:50px;height:50px" />
                        <a style="font-size:30px;color:white">商城管理后台</a>
                    </el-menu-item>
                    <el-menu-item v-for="item in tableData">
                        <a :href="item.url" style="font-size:20px;color:white">
                            {{item.mname}}
                        </a>
                    </el-menu-item>
                </el-menu>
            </el-header>
        </el-container>
    </div>
    <style>
        /*去掉a标签的下划线*/
        a {
            color: black;
            text-decoration: none;
        }
    </style>
    
    <script type="text/javascript">
    new Vue({
        el: '#user',
        data() {
            return {
                tableData: [],
            }
        },
        created: function () {
            this.getData();
        },
        methods: {
            //显示
            getData() {
                var url = 'http://localhost:62874/api/Login/GetMenu';
                this.$http.get(url, {}).then(function (result) {
                    this.tableData = result.data;
                });
            },
        }
    });

</script>
</body>
</html>
